package com.csdemos.algs.greedy;

import java.util.LinkedList;

public class Greedy {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        int [] s1 = {0,1,3,0,5,3,5,6,8,8,2,12};
        int [] f1 = {0,4,5,6,7,8,9,10,11,12,13,14};
        
        LinkedList<Integer> list = ActivitySelector.recursive(s1, f1, 0, s1.length);
        for(Integer i : list){
            System.out.println(i);
        }
        System.out.println();
        int [] s2 = {1,3,0,5,3,5,6,8,8,2,12};
        int [] f2 = {4,5,6,7,8,9,10,11,12,13,14};
        
        list = ActivitySelector.iterative(s2, f2);
        for(Integer i : list){
            System.out.println(i);
        }
        System.out.println();
    }
}
